function config($stateProvider,$urlRouterProvider,$httpProvider)
{
     //设置默认的首页
     $urlRouterProvider.otherwise("/index");

     //设置状态变化，加载不同的模板
     $stateProvider
     .state('index',{  //首页
         url:'/index',
         templateUrl:'../src/views/admin/index.html',
         controller:'MainController'
     })
     .state('login',{
         url:'/login',
         templateUrl:'../src/views/admin/login.html',
         controller:'loginController'
     })
     .state('logout',{
         url:'/logout',
         templateUrl:'../src/views/admin/login.html',
         controller:'logoutController'
     })
     .state('FcateList',{
         url:'/FcateList',
         templateUrl:'../src/views/admin/FcateList.html',
         controller:'FcateListController'
     })
     .state('FcateName',{
         url:'/FcateName/:FcateName',
         templateUrl:'../src/views/admin/FcateList.html',
         controller:'FcateNameController'
     })
     .state('FcateAdd',{
         url:'/FcateAdd',
         templateUrl:'../src/views/admin/FcateAdd.html',
         controller:'FcateAddController'
     })
     .state('FcateEdit',{
         url:'/FcateEdit/:fcateId',
         templateUrl:'../src/views/admin/FcateEdit.html',
         controller:'FcateEditController'
     })
     .state('FcateDelete',{
         url:'/FcateDelete/:fcateId',
         controller:'FcateDeleteController'
     })
     .state('FoodList',{
         url:'/FoodList',
         templateUrl:'../src/views/admin/FoodList.html',
         controller:'FoodListController'
     })
     .state('FoodCate',{
         url:'/FoodCate/:FcateId',
         templateUrl:'../src/views/admin/FoodList.html',
         controller:'FoodCateController'
     })
     .state('FoodName',{
         url:'/FoodName/:FoodName',
         templateUrl:'../src/views/admin/FoodList.html',
         controller:'FoodNameController'
     })
     .state('FoodAdd',{
         url:'/FoodAdd',
         templateUrl:'../src/views/admin/FoodAdd.html',
         controller:"FoodAddController"
     })
     .state('FoodEdit',{
         url:'/FoodEdit/:foodId',
         templateUrl:'../src/views/admin/FoodEdit.html',
         controller:'FoodEditController'
     })
     .state('FoodDelete',{
         url:'/FoodDelete/:foodId',
         controller:"FoodDeleteController"
     })
     .state('AdminList',{
         url:'/AdminList',
         templateUrl:'../src/views/admin/AdminList.html',
         controller:"AdminListController"
     })
     .state('AdminName',{
         url:'/AdminName/:adminName',
         templateUrl:'../src/views/admin/AdminList.html',
         controller:"AdminNameController"
     })
     .state('DeleteAdmin',{
         url:'/DeleteAdmin/:adminId',
         templateUrl:'../src/views/admin/AdminList.html',
         controller:"DeleteAdminController"
     })
     .state('AdminAdd',{
         url:'/AdminAdd',
         templateUrl:'../src/views/admin/AdminAdd.html',
         controller:"AdminAddController"
     })
     .state('AdminEdit',{
         url:'/AdminEdit/:adminId',
         templateUrl:'../src/views/admin/AdminEdit.html',
         controller:"AdminEditController"
     })
     .state('ScateList',{
         url:'/ScateList',
         templateUrl:'../src/views/admin/ScateList.html',
         controller:"ScateListController"
     })
     .state('ScateName',{
         url:'/ScateName/:ScateName',
         templateUrl:'../src/views/admin/ScateList.html',
         controller:"ScateNameController"
     })
     .state('ScateAdd',{
         url:'/ScateAdd',
         templateUrl:'../src/views/admin/ScateAdd.html',
         controller:'ScateAddController'
     })
     .state('ScateEdit',{
         url:'/ScateEdit/:scateId',
         templateUrl:'../src/views/admin/ScateEdit.html',
         controller:'ScateEditController'
     })
     .state('ScateDelete',{
         url:'/ScateDelete/:scateId',
         controller:'ScateDeleteController'
     })
     .state('ShopList',{
         url:'/ShopList',
         templateUrl:'../src/views/admin/ShopList.html',
         controller:'ShopListController'
     })
     .state('ShopCate',{
         url:'/ShopCate/:ScateId',
         templateUrl:'../src/views/admin/ShopList.html',
         controller:'ShopCateController'
     })
     .state('ShopName',{
         url:'/ShopName/:ShopName',
         templateUrl:'../src/views/admin/ShopList.html',
         controller:'ShopNameController'
     })
     .state('ShopAdd',{
         url:'/ShopAdd',
         templateUrl:'../src/views/admin/ShopAdd.html',
         controller:"ShopAddController"
     })
     .state('ShopEdit',{
         url:'/ShopEdit/:shopId',
         templateUrl:'../src/views/admin/ShopEdit.html',
         controller:'ShopEditController'
     })
     .state('ShopDelete',{
         url:'/ShopDelete/:shopId',
         controller:"ShopDeleteController"
     })
     .state('ArtList',{
         url:'/ArtList',
         templateUrl:'../src/views/admin/ArtList.html',
         controller:'ArtListController'
     })
     .state('ArtName',{
         url:'/ArtName/:ArtName',
         templateUrl:'../src/views/admin/ArtList.html',
         controller:'ArtNameController'
     })
     .state('ArtAdd',{
         url:'/ArtAdd',
         templateUrl:'../src/views/admin/ArtAdd.html',
         controller:"ArtAddController"
     })
     .state('ArtEdit',{
         url:'/ArtEdit/:artId',
         templateUrl:'../src/views/admin/ArtEdit.html',
         controller:'ArtEditController'
     })
     .state('ArtDelete',{
         url:'/ArtDelete/:artId',
         controller:"ArtDeleteController"
     })
     .state('ContList',{
         url:'/CtcList',
         templateUrl:'../src/views/admin/CtcList.html',
         controller:'ContListController'
     })
     .state('ContName',{
         url:'/CtcName/:CtcName',
         templateUrl:'../src/views/admin/CtcList.html',
         controller:'ContNameController'
     })
     .state('ContAdd',{
         url:'/CtcAdd',
         templateUrl:'../src/views/admin/CtcAdd.html',
         controller:"ContAddController"
     })
     .state('ContEdit',{
         url:'/CtcEdit/:contId',
         templateUrl:'../src/views/admin/CtcEdit.html',
         controller:'ContEditController'
     })
     .state('ContDelete',{
         url:'/CtcDelete/:contId',
         controller:"ContDeleteController"
     })
     .state('NoticeList',{
         url:'/NoticeList',
         templateUrl:'../src/views/admin/NoticeList.html',
         controller:'NoticeListController'
     })
     .state('NoticeName',{
         url:'/NoticeName/:NoticeName',
         templateUrl:'../src/views/admin/NoticeList.html',
         controller:'NoticeNameController'
     })
     .state('NoticeAdd',{
         url:'/NoticeAdd',
         templateUrl:'../src/views/admin/NoticeAdd.html',
         controller:"NoticeAddController"
     })
     .state('NoticeEdit',{
         url:'/NoticeEdit/:noticeId',
         templateUrl:'../src/views/admin/NoticeEdit.html',
         controller:'NoticeEditController'
     })
     .state('NoticeDelete',{
         url:'/NoticeDelete/:noticeId',
         controller:"NoticeDeleteController"
     });
}

food_admin.config(config).run();